<extend name="Common@Layout:hui-admin" />
<block name="title"><title>应用私有用户-用户管理-Administator管理后台</title></block>
<block name="style">
</block>

<block name="main">
	<nav class="breadcrumb">
		<i class="Hui-iconfont"></i>
		 统计管理 <span class="c-gray en">&gt;</span>
		 新增人员
		<a class="btn btn-success radius r mr-20" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont"></i></a>
	</nav>
	
	<div class="pd-20">
		<php>
			$g_did = R('Ygcl/Apiadmin/getxiaoqurole');
			if($g_did){
				$map['did'] = array('in',$g_did);
			}
		</php>
		<div class="text-c"> 
			<form status="{:u('index')}" method="get" id="form">
			校区：
			<span class="select-box inline">
			<select name="did" class="select xiaoqu">
				<option value="">全部</option>
				<foreach name="xiaoqu" item="vo">
					<if condition="$g_did">
						<if condition="$g_did eq $vo['id']">
						<option value="{$vo.id}" <eq name="_GET['did']" value="$vo['id']">selected</eq>>{$vo.title}</option>
						</if>
					<else/>
						<option value="{$vo.id}" <eq name="_GET['did']" value="$vo['id']">selected</eq>>{$vo.title}</option>
					</if>
				</foreach>
			</select>
			</span>
			日期范围：
			<input type="text" name="start_time" value="{$_GET['start_time']}" class="input-text mini-time" style="width:120px;">
			-
			<input type="text" name="end_time" value="{$_GET['end_time']}" class="input-text mini-time" style="width:120px;">
			<input type="hidden" name="p" value="1"/>
			<button name="" id="" class="btn btn-success" type="submit"><i class="Hui-iconfont"></i> 搜索</button>
			</form>
		</div>
		<php>
			$map['status'] = 1;
			$result = _get_list_data('/count/index/add/',$_GET,$map,D('LessonStudentRelation'));
		</php>
		<form class="mini-form mt-20">
		<table class="table table-border table-bordered table-hover table-bg mini-sort">
			<thead>
				<tr>
					<th scope="col" colspan="12">
						{:R('api/getxiaoqu',array('did'=>$_GET['did']))}
						{$_GET['start_time']}到<if condition="$_GET['end_time']">{$_GET['end_time']}<else/>至今</if>，共增加{$result['data']['count']}位学生<a class="btn btn-primary radius ml-5" href="{:U('api/export_add',$_GET)}">导出数据并生成excel</a> 
					</th>
				</tr>
				<tr class="text-c">
					<th width="25"><input type="checkbox" value="" name=""></th>
					<th width="40">ID</th>
					<th>姓名</th>
					<th>手机</th>
					<th>家长姓名</th>
					<th>学期</th>	
					<th>校区</th>				
					<th>课程</th>
					<th>班级</th>
					<th width="70">操作</th>
				</tr>
			</thead>
			<tbody>
				<foreach name="result['data']['list']" item="vo">
				<tr class="text-c">
					<td><input type="checkbox" value="{$vo.id}" name="ids[]"></td>
					<td>{:replace_query_str($_GET['keywords'],$vo['id'])}</td>
					<td>{:replace_query_str($_GET['keywords'],$vo['student'])}</td>
					<td>{:replace_query_str($_GET['keywords'],$vo['tel'])}</td>
					<td>{:replace_query_str($_GET['keywords'],$vo['jzxm'])}</td>
					<td>{:replace_query_str($_GET['keywords'],$vo['term']['title'])}</td>
					<td>{:replace_query_str($_GET['keywords'],$vo['xiaoqu']['title'])}</td>
					<td>{:replace_query_str($_GET['keywords'],$vo['kecheng']['title'])}</td>
					<td>{:replace_query_str($_GET['keywords'],$vo['banji']['lessonname'])}</td>
					<td class="f-14">
						<if condition="$vo[orderid]">
						<a style="text-decoration:none" href="javascript:;" onclick="open_iframe_dialog('{:U('Ygcl/Orderadmin/detail',array(id=>$vo[orderid]))}','订单详情',['600px','600px'],1)" title="详情">订单详情</a>
						</if>
					</td>
				</tr>
				</foreach>
			</tbody>
		</table>
		</form>
		{$result['pagetpl']}
	</div>
</block>

<block name="script">
<script type="text/javascript" src="/Public/Assets/tpl/template.js"></script> 
<script>
$('#changeG').change(function(){
	window.location.href="/admin/Users/app/appid/"+$('#changeG').val();
});
$(function(){
	$('.mini-time').datepicker();
	
});
</script>
</block>